package Q2;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别

        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        //求前缀和
        long[] dp = new long[n + 1];
        for (int i = 1; i < n + 1; i++) {
            dp[i] = dp[i - 1] + arr[i - 1];
        }

        int left = 0, right = 1;
        int ret = Integer.MAX_VALUE;
        int retLeft = 0, retRight = 0; //结果区间的左右端点，从 1 开始

        while (left < right && right <= n) {
            long sum = 0;
            while (sum < x && right <= n) {
                sum = dp[right] - dp[left];
                if (sum >= x) {
                    break;
                }
                right++;
            }
            while (sum >= x) {
                int len = right - left;
                if (ret > len) {
                    ret = len;
                    retLeft = left;
                    retRight = right;
                }
                sum = dp[right] - dp[left];;
                left++;
            }
//            left++;
        }

        System.out.println(retLeft + " " + retRight);
    }
}